package
{
	import mx.collections.ArrayCollection;
	import mx.rpc.events.ResultEvent;
	import mx.utils.ArrayUtil;
	import mx.utils.ObjectProxy;
	
	public class utils
	{
		public function utils()
		{	
		}
		
		//Lee los resultados del HTTPService y los almacena en un ArrayCollection
		public function leerEvent(event:ResultEvent, collection:ArrayCollection):ArrayCollection {
			if (event.result.consulta.fila is ObjectProxy)
				collection = new ArrayCollection(ArrayUtil.toArray(event.result.consulta.fila));
			else
				collection = event.result.consulta.fila;
			return collection;
		}
	}
}